﻿<Page
    x:Class="WebViewExamples.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:WebViewExamples"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Page.BottomAppBar>
        <CommandBar>
            <AppBarButton Label="Load" Icon="OpenFile" Click="ButtonBase_OnClick"></AppBarButton>
            <AppBarButton Label="Mobile" Icon="CellPhone" Click="ViewMobile_OnClick"></AppBarButton>
            <AppBarButton Label="SVG" Icon="WebCam" Click="ViewSvg_OnClick"></AppBarButton>
            <AppBarButton Label="String" Icon="List" Click="ViewString_OnClick"></AppBarButton>
            <AppBarButton Label="JavaScript" Icon="Phone" Click="CallJavaScript_OnClick"></AppBarButton>
            <AppBarButton Label="WebGL" Icon="Street" Click="WebGL_OnClick"></AppBarButton>
        </CommandBar>        
    </Page.BottomAppBar>
    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="80"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="300"/>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" 
                    Grid.ColumnSpan="2"
                    Margin="5"
                    Orientation="Horizontal">
            <Button Content="View Web Page" Margin="5" Click="ButtonBase_OnClick"/>
            <Button Content="View Page as Mobile" Margin="5" Click="ViewMobile_OnClick"/>
            <Button Content="View HTML5 (SVG)" Margin="5" Click="ViewSvg_OnClick"/>
            <Button Content="Load String Literal" Margin="5" Click="ViewString_OnClick"/>
            <Button Content="Call JavaScript Function" Click="CallJavaScript_OnClick"/>
            <Button  Content="WebGL" Click="WebGL_OnClick"/>
        </StackPanel>
        <WebView Grid.Row="1" Grid.Column="0" Margin="20" x:Name="WebViewControl"/>
        <Rectangle 
            Grid.Row="1" 
            Grid.Column="1"
            Width="280"
            Height="180"
            Margin="0 20 0 0"
            VerticalAlignment="Top">
            <Rectangle.Fill>
                <WebViewBrush x:Name="WebBrush" SourceName="WebViewControl"></WebViewBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Ellipse Grid.Row="1"
                 Grid.Column="1"
                 Width="280"
                 Height="180"
                 Margin="0 20 0 0"
                 VerticalAlignment="Top"
                 Fill="Red"
                 Opacity="0.2"></Ellipse>
    </Grid>
</Page>
